package com.rpc.center;

import com.jingyuan.client.NettyHarmonyServiceImpl;
import com.rpc.center.server.CenterServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.io.IOException;

@SpringBootApplication
public class TestCenter implements CommandLineRunner {

    @Autowired
    @Qualifier("netty")
    private CenterServer server;

    public static void main(String[] args) throws IOException {
        SpringApplication.run(TestCenter.class,args);

    }

    @Override
    public void run(String... args) throws Exception {
        //CenterServer server = new SocketCenterServerImpl();
        server.init();
        server.startServer();
        NettyHarmonyServiceImpl nettyHarmonyService=new NettyHarmonyServiceImpl();
        
    }
}
